<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>事件捕获冒泡介绍</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    #outter{
      width: 200px;
      height: 200px;
      background: #89c;
      position: relative;
      border-radius: 50%;
      margin: 100px auto;
    }
    #inner{
      border-radius: 50%;
      width: 100px;
      height: 100px;
      background: rgb(153, 106, 34);
      position: absolute;
      left: 50px;
      top: 50px;
    }
  </style>
</head>
<body>
  <div id="outter">
    <div id="inner">

    </div>
  </div>
  <script>
    let outter = document.querySelector('#outter');
    let inner = document.querySelector( '#inner');
    outter.addEventListener('click',function(){
      console.log('捕获outter')
    },true);
    inner.addEventListener('click',function(){
      console.log('捕获inner')
    },true);
    outter.addEventListener('click',function(){
      console.log('冒泡outter')
    });
    inner.addEventListener('click',function(){
      console.log('冒泡inner')
    });
  </script>
</body>
</html>